﻿ 
using System.Collections.Generic; 
using NTTDATA.BEENChina.ResultCertification.DataStore;
using NTTDATA.BEENChina.ResultCertification.model;

namespace NTTDATA.BEENChina.ResultCertification.Logic
{
    /// <summary>
    /// 单例 得到全部的citys
    /// </summary>
    public class JaCitys
    {

        private JaCitys()
        {
            IJaCityClientAccess  clientAccess = new JaCityClientAccess();
            Citys = clientAccess.GetJaCitys();
            Mansions = clientAccess.GetJaMansions();
        }

        public List<JaCityItem> Citys { get; set; }
        public List<JaMansionItem> Mansions { get; set; }

        private static JaCitys _jaCitys = null;

        public static JaCitys GetInstance()
        {
            if (_jaCitys == null)
                _jaCitys = new JaCitys();

            return _jaCitys;
        }
    }
}
